home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 March / Disc 1 / PCU030201.iso / software / utils / files / activesms.exe / data1.cab / Example_Files / Samples / ASP / DoSMSSend.asp next >
Encoding:
Text File  |  2001-12-19  |  1.2 KB  |  49 lines

  1. <%@ LANGUAGE=JScript %>
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Active SMS - Send SMS</TITLE>
  5. </HEAD>
  6. <BODY>
  7. <H1>Send SMS Message Request</H1>
  8.  
  9. <P>
  10. <%
  11. var ActiveSMS = Server.CreateObject("Intellisoftware.ActiveSMS");
  12.  
  13. var PhoneNumber = Request("PhoneNumber")
  14. var MessageText = Request("MessageText")
  15.  
  16. var MessageId = ActiveSMS.SendMessage ( PhoneNumber, MessageText, 15000);
  17. var Status = ActiveSMS.GetSendStatus(MessageId);
  18.  
  19. switch ( Status )
  20. {
  21.     case 2 : //jsSent
  22.         Response.Write ( "Message has been sent" );
  23.         break;
  24.     case 7 : //jsErrTimeout
  25.         Response.Write ( "Message not sent, Server too busy [Non-Queued Mode]" );
  26.         break;
  27.     case 3 : //jsErrNumberInvalid
  28.         Response.Write ( "Message not sent, Invalid Number" );
  29.         break;
  30.     case 0 : //jsPending
  31.     case 1 : //jsProcessing
  32.         Response.Write ( "Message has been queued" );
  33.         break;
  34.     case 4 : //jsErrNetworkFailure
  35.         Response.Write ( "Message not sent, Failure reported by phone network" );
  36.         break;
  37.     case 5 : //jsErrPhoneCommsError
  38.         Response.Write ( "Message not sent, Error communicating with handset" );
  39.         break;
  40.     default :
  41.         Response.Write ( "Message not sent, Internal error occured (see EventLog)" );
  42.         break;
  43. }
  44. %>
  45. </P>
  46.  
  47. </BODY>
  48. </HTML>
  49.